//CAM_KEY_pressed.sqf start
switch ((_this select 1)) do
{
		//N key
		case 49:
		{	
			if (!NORRN_CAM_NVG) then
			{
				camUseNVG true;
				NORRN_CAM_NVG = true;
			}else {
				camUseNVG false;
				NORRN_CAM_NVG = false;
			};
		};
		//A key
		case 30:
		{	
		if checkattach then {
		  _pos = getPosATL lapin;
			lapin setdir (getDir lapin)-10;
			lapin setposATL [_pos select 0, _pos select 1, _pos select 2];
		};
			
		};
		//D key
		case 32:
		{	
		if checkattach then {
		  _pos = getPosATL lapin;
			lapin setdir (getDir lapin)+10;
			lapin setposATL [_pos select 0, _pos select 1, _pos select 2];
		};

		};
		/*
		//Space key
		case 57:
		{	
		if checkattach then {
			detach object3D;
			checkattach = false;
		}else{
			object3D attachTo [lapin,[0,0,VtsHight]]; 
			checkattach = true;
		};
	
		};	
		*/
		//H key
/*	
		case 35:
		{	
		if checkattach then {
			detach object3D;
			checkattach = false;
		}else{
			object3D attachTo [lapin,[0,0,VtsHight]]; 
			checkattach = true;
		};
		_pos2 = getPos lapin;
			unita2 = object2place createVehicleLocal _pos2;
			lapin = unita2;
			CamName camSetTarget lapin;
			deleteVehicle insect;

		};	
		
*/		
	//S key
		case 31:
		{	
			if checkattach then {
		
			_direction = direction lapin;
			_pos = getPosATL lapin;
	//		lapin setPos [(_pos select 0)-(0.5*sin(_direction)), (_pos select 1)-(0.5*cos(_direction)), (_pos select 2)];
			lapin setposATL [(_pos select 0)-(Step3d*sin(_direction)), (_pos select 1)-(Step3d*cos(_direction)),(_pos select 2)];
			};
		};
		//W key
		case 17:
		{	
		if checkattach then {
			_direction = direction lapin;
			_pos = getPosATL lapin;
//			lapin setPos [(_pos select 0)+(0.5*sin(_direction)), (_pos select 1)+(0.5*cos(_direction)),(_pos select 2)];
			lapin setposATL [(_pos select 0)+(Step3d*sin(_direction)), (_pos select 1)+(Step3d*cos(_direction)),(_pos select 2)];
		};
		};
		//Q key		
		case 16:
		{	
		if checkattach then {
			_direction = direction lapin;
			_pos = getPosATL lapin;
//			lapin setPos [(_pos select 0)+(0.5*sin(_direction)), (_pos select 1)+(0.5*cos(_direction)),(_pos select 2)];
			lapin setposATL [(_pos select 0)+(-Step3d*sin(_direction+90)), (_pos select 1)+(-Step3d*cos(_direction+90)),(_pos select 2)];
		};
		};
		//E key		
		case 18:
		{	
		if checkattach then {
			_direction = direction lapin;
			_pos = getPosATL lapin;
//			lapin setPos [(_pos select 0)+(0.5*sin(_direction)), (_pos select 1)+(0.5*cos(_direction)),(_pos select 2)];
			lapin setposATL [(_pos select 0)+(Step3d*sin(_direction+90)), (_pos select 1)+(Step3d*cos(_direction+90)),(_pos select 2)];
		};
		};
		//C key
		case 46:
		{	
		lapin setposATL [ getPosATL lapin select 0, getPosATL lapin select 1, (getPosATL lapin select 2)+VtsHightstep] ;
		/*if checkattach then {
		//	VtsHight  = VtsHight  +  VtsHightstep;
			object3D attachTo [lapin,[0,0,VtsHight ]]; 
		};*/
		};
		//X key
		case 45:
		{
			//if checkattach then 
			//{
				//if (VtsHight > VtsHightmin) then 
				//{
				/*VtsHight  = VtsHight  -  VtsHightstep;
				object3D attachTo [lapin,[0,0,VtsHight ]];*/ 
		  lapin setposATL [ getPosATL lapin select 0, getPosATL lapin select 1, (getPosATL lapin select 2)-VtsHightstep] ;
				//};
			//};
		};

}; 
